import Vue from 'vue'
import Router from 'vue-router'

//import login from '@/components/template/Login'
//import index from '@/components/Index'
//import basicsetting from '@/components/basicsetting/Basicsetting'
//import introductionscore from '@/components/introductionscore/Introductionscore'
//import performancecalculation from '@/components/performancecalculation/Performancecalculation'
//import performancequery from '@/components/performancequery/Performancequery'
//import querydetailed from '@/components/performancequery/Querydetailed'
//import page404 from '@/components/template/Page404'
//import personalcenter from '@/components/template/Personalcenter'
//import grademanagement from '@/components/basicsetting/Grademanagement'
//import classmanagement from '@/components/basicsetting/Classmanagement'
//import studentmanagement from '@/components/basicsetting/Studentmanagement'
//import teachermanagement from '@/components/basicsetting/Teachermanagement'
//import indexshow from '@/components/template/Indexshow'

const login = r => require.ensure([], () => r(require('@/components/template/Login')), 'chunkname1')
const index = r => require.ensure([], () => r(require('@/components/Index')), 'chunkname1')
const basicsetting = r => require.ensure([], () => r(require('@/components/performance/basicsetting/Basicsetting')), 'chunkname2')
const teachingAssessment = r => require.ensure([], () => r(require('@/components/settingPart/moduleSetting/teachingAssessment')), 'chunkname2')
const originalScoreStatistics = r => require.ensure([], () => r(require('@/components/settingPart/moduleSetting/originalScoreStatistics')), 'chunkname2')
const autoMessage = r => require.ensure([], () => r(require('@/components/settingPart/messageSetting/autoMessage')), 'chunkname2')
const manualMessage = r => require.ensure([], () => r(require('@/components/settingPart/messageSetting/manualMessage')), 'chunkname2')
const categoryManage = r => require.ensure([], () => r(require('@/components/settingPart/systemHelp/categoryManage')), 'chunkname2')
const helpManage = r => require.ensure([], () => r(require('@/components/settingPart/systemHelp/helpManage')), 'chunkname2')
const infoManage = r => require.ensure([], () => r(require('@/components/settingPart/systemInfo/infoManage')), 'chunkname2')
//categoryManage

const indexshow = r => require.ensure([], () => r(require('@/components/template/Indexshow')), 'chunkname1')

const page404 = r => require.ensure([], () => r(require('@/components/template/Page404')), 'chunkname3')
const personalcenter = r => require.ensure([], () => r(require('@/components/template/Personalcenter')), 'chunkname3')
const systemHelp = r => require.ensure([], () => r(require('@/components/template/systemHelp')), 'chunkname3')


const grademanagement = r => require.ensure([], () => r(require('@/components/performance/basicsetting/Grademanagement')), 'chunkname3')
const classmanagement = r => require.ensure([], () => r(require('@/components/performance/basicsetting/Classmanagement')), 'chunkname3')
const studentmanagement = r => require.ensure([], () => r(require('@/components/performance/basicsetting/Studentmanagement')), 'chunkname3')
const teachermanagement = r => require.ensure([], () => r(require('@/components/performance/basicsetting/Teachermanagement')), 'chunkname3')


const statistics = r => require.ensure([], () => r(require('@/components/performance/statistics/Statistics')), 'chunkname1')
const statisticsHigh = r => require.ensure([], () => r(require('@/components/performance/statistics/High')), 'chunkname1')
const statisticsMiddle = r => require.ensure([], () => r(require('@/components/performance/statistics/Middle')), 'chunkname1')
const introductionscorehigh = r => require.ensure([], () => r(require('@/components/performance/introductionscore/high/Introductionscorehigh')), 'chunkname2')
const introductionscoremiddle = r => require.ensure([], () => r(require('@/components/performance/introductionscore/middle/Introductionscoremiddle')), 'chunkname2')
const performancequeryhigh = r => require.ensure([], () => r(require('@/components/performance/performancequery/high/Performancequery')), 'chunkname2')
const performancequerymiddle = r => require.ensure([], () => r(require('@/components/performance/performancequery/middle/Performancequery')), 'chunkname2')
const querydetailedhigh = r => require.ensure([], () => r(require('@/components/performance/performancequery/high/Querydetailed')), 'chunkname3')
const querydetailedmiddle = r => require.ensure([], () => r(require('@/components/performance/performancequery/middle/Querydetailed')), 'chunkname3')

const historyqueryhigh = r => require.ensure([], () => r(require('@/components/performance/historyquery/high/Historyquery')), 'chunkname3')
const historyquerymiddle = r => require.ensure([], () => r(require('@/components/performance/historyquery/middle/Historyquery')), 'chunkname3')
//分析分析模块路由
const dataAnalyseHigh = r => require.ensure([], () => r(require('@/components/qualityAnalysis/dataAnalyse/high/High')), 'chunkname4')
const dataAnalyseMiddle = r => require.ensure([], () => r(require('@/components/qualityAnalysis/dataAnalyse/middle/Middle')), 'chunkname4')
const massCalculationHigh = r => require.ensure([], () => r(require('@/components/qualityAnalysis/massCalculation/high/High')), 'chunkname4')
const massCalculationMiddle = r => require.ensure([], () => r(require('@/components/qualityAnalysis/massCalculation/middle/Middle')), 'chunkname4')
const qualityQueryHigh = r => require.ensure([], () => r(require('@/components/qualityAnalysis/qualityQuery/high/High')), 'chunkname4')
const examInfoHigh = r => require.ensure([], () => r(require('@/components/qualityAnalysis/qualityQuery/high/ExamInfo')), 'chunkname4')
const queryDetailedHigh = r => require.ensure([], () => r(require('@/components/qualityAnalysis/qualityQuery/high/Querydetailed')), 'chunkname4')
const qualityQueryMiddle = r => require.ensure([], () => r(require('@/components/qualityAnalysis/qualityQuery/middle/Middle')), 'chunkname4')
const examInfoMiddle = r => require.ensure([], () => r(require('@/components/qualityAnalysis/qualityQuery/middle/ExamInfo')), 'chunkname4')
const queryDetailedMiddle = r => require.ensure([], () => r(require('@/components/qualityAnalysis/qualityQuery/middle/Querydetailed')), 'chunkname4')
const scoreReport = r => require.ensure([], () => r(require('@/components/qualityAnalysis/studentInquiry/scoreReport')), 'chunkname4')
const studentQueryDetailed = r => require.ensure([], () => r(require('@/components/qualityAnalysis/studentInquiry/Querydetailed')), 'chunkname4')
//新高考模块
const combinationScore = r => require.ensure([], () => r(require('@/components/newHighTest/chooseDataAnalysis/combinationScore')), 'chunkname5')
const studentChooseSubject = r => require.ensure([], () => r(require('@/components/newHighTest/chooseSubject/studentChooseSubject')), 'chunkname5')
const subjectStatistics = r => require.ensure([], () => r(require('@/components/newHighTest/chooseSubject/subjectStatistics')), 'chunkname5')

//选科排课模块
const curriculumRules = r => require.ensure([], () => r(require('@/components/selectCourses/courseSystem/curriculumRules')), 'chunkname5')
const scheduleRules = r => require.ensure([], () => r(require('@/components/selectCourses/courseSystem/scheduleRules')), 'chunkname5')
const teacherRules = r => require.ensure([], () => r(require('@/components/selectCourses/courseSystem/teacherRules')), 'chunkname5')

const achievementIntroduction = r => require.ensure([], () => r(require('@/components/selectCourses/hierarchicalScheduling/achievementIntroduction')), 'chunkname5')
const divisionResult = r => require.ensure([], () => r(require('@/components/selectCourses/hierarchicalScheduling/divisionResult')), 'chunkname5')
const hierarchicalNameManagement = r => require.ensure([], () => r(require('@/components/selectCourses/hierarchicalScheduling/hierarchicalNameManagement')), 'chunkname5')
const laminationManagement = r => require.ensure([], () => r(require('@/components/selectCourses/hierarchicalScheduling/laminationManagement')), 'chunkname5')
const laminationManagementdetail = r => require.ensure([], () => r(require('@/components/selectCourses/hierarchicalScheduling/laminationManagementdetail')), 'chunkname5')

const selectionManagement = r => require.ensure([], () => r(require('@/components/selectCourses/selectiveSection/selectionManagement')), 'chunkname5')
const studentSelection = r => require.ensure([], () => r(require('@/components/selectCourses/selectiveSection/studentSelection')), 'chunkname5')
const selectionManageDetail = r => require.ensure([], () => r(require('@/components/selectCourses/selectiveSection/selectionManageDetail')), 'chunkname5')

const classesGroup = r => require.ensure([], () => r(require('@/components/selectCourses/basicSetting/classesGroup')), 'chunkname5')
const classHours = r => require.ensure([], () => r(require('@/components/selectCourses/basicSetting/classHours')), 'chunkname5')
const courseSetting = r => require.ensure([], () => r(require('@/components/selectCourses/basicSetting/courseSetting')), 'chunkname5')
const curriculumArrangement = r => require.ensure([], () => r(require('@/components/selectCourses/basicSetting/curriculumArrangement')), 'chunkname5')
const teachGroup = r => require.ensure([], () => r(require('@/components/selectCourses/basicSetting/teachGroup')), 'chunkname5')
const teachRoomSetting = r => require.ensure([], () => r(require('@/components/selectCourses/basicSetting/teachRoomSetting')), 'chunkname5')




Vue.use(Router)

//初始化的路由表
export const constantRouterMap = [
	{path: '/', redirect: '/login'},
	{name:'login',path: '/login',component: login},
	{name:'404',path: '/404',component: page404},
	
]

export default new Router({
	//浏览器地址栏隐藏
//	mode: 'abstract',
//去除url带#
//	mode: 'history',
  routes: constantRouterMap
})


//根据权限创建的动态路由表
export const asyncRouterMap = [
	{path: '/index',component: index,children:[
	
		{name:"indexshow",path: '/indexshow',component: indexshow},											//首页展示页
	    {name:"个人中心",path: '/personalcenter'},							//个人中心
	    {name:"personalinfo",path: '/personalcenter/personalinfo',component: personalcenter},
	    {name:"systemHelp",path: '/personalcenter/systemhelp',component: systemHelp},//个人中心
		
		//基本设置
    	{name:"基本设置",path: '/basicsetting',component: basicsetting},
    	 	{name:"grademanagement",path: '/basicsetting/grademanagement',component: grademanagement},			//年段管理
		    {name:"classmanagement",path: '/basicsetting/classmanagement',component: classmanagement},			//班级管理
		    {name:"studentmanagement",path: '/basicsetting/studentmanagement',component: studentmanagement},	//学生管理
		    {name:"teachermanagement",path: '/basicsetting/teachermanagement',component: teachermanagement},	//教师管理
    	{name:"模块设置",path: '/setting/modulesetting'},
	    	{name:"teachingAssessment",path: '/setting/modulesetting/teachingassessment',component: teachingAssessment},	//教学评价
	    	{name:"originalScoreStatistics",path: '/setting/modulesetting/originalscorestatistics',component: originalScoreStatistics},	//原始分统计
	    {name:"短信设置",path: '/setting/messagesetting'},
	    	{name:"autoMessage",path: '/setting/messagesetting/automessage',component: autoMessage},
	    	{name:"manualMessage",path: '/setting/messagesetting/manualmessage',component: manualMessage},
    	{name:"系统帮助",path: '/setting/systemhelp'},
	    	{name:"categoryManage",path: '/setting/systemhelp/categorymanage',component: categoryManage},
	    	{name:"helpManage",path: '/setting/systemhelp/helpmanage',component: helpManage},
	    {name:"系统消息",path: '/setting/systeminfo'},
	    	{name:"infoManage",path: '/setting/systeminfo/infomanage',component: infoManage},
    	
    	//教学评价
    	{name:"大数据分析",path: '/performance/statistics',redirect: '/performance/statistics/middle'},
    		{name:"statisticsmiddle",path: '/performance/statistics/statisticsmiddle',component: statisticsMiddle},	//大数据分析——初中
	    	{name:"statisticshigh",path: '/performance/statistics/statisticshigh',component: statisticsHigh},	//大数据分析——高中
	    {name:"评价计算",path: '/performance/introductionscore',},
	    	{name:"introductionscorehigh",path: '/performance/introductionscore/introductionscorehigh',component: introductionscorehigh},	//高中评价计算
	    	{name:"introductionscoremiddle",path: '/performance/introductionscore/introductionscoremiddle',component: introductionscoremiddle},	//初中评价计算
	    {name:"评价查询",path: '/performance/performancequery'},
	    	{name:"performancequeryhigh",path: '/performance/performancequery/performancequeryhigh',component: performancequeryhigh},
		    {name:"performancequerymiddle",path: '/performance/performancequery/performancequerymiddle',component: performancequerymiddle},
		    {name:"querydetailedhigh",path: '/performance/performancequery/performancequeryhigh/querydetailedhigh',component: querydetailedhigh},
		    {name:"querydetailedmiddle",path: '/performance/performancequery/performancequerymiddle/querydetailedmiddle',component: querydetailedmiddle},
		{name:"历史查询",path: '/performance/historyquery'},
		    {name:"historyqueryhigh",path: '/performance/historyquery/historyqueryhigh',component: historyqueryhigh},
		    {name:"historyquerymiddle",path: '/performance/historyquery/historyquerymiddle',component: historyquerymiddle},
	    //原始分统计
	    {name:"大数据分析",path: '/qualityAnalysis/dataanalyse'},
	    	{name:"dataanalysehigh",path: '/qualityAnalysis/dataanalyse/dataanalysehigh',component: dataAnalyseHigh},			//大数据分析高中
	    	{name:"dataanalysemiddle",path: '/qualityAnalysis/dataanalyse/dataanalysemiddle',component: dataAnalyseMiddle},			//大数据分析初中
	    {name:"分析计算",path: '/qualityAnalysis/masscalculation'},
	    	{name:"massCalculationHigh",path: '/qualityAnalysis/masscalculation/masscalculationhigh',component: massCalculationHigh},			//分析计算高中
	    	{name:"massCalculationMiddle",path: '/qualityAnalysis/masscalculation/masscalculationmiddle',component: massCalculationMiddle},			//分析计算初中
	    {name:"分析查询",path: '/qualityAnalysis/qualityquery'},
	    	{name:"qualityQueryHigh",path: '/qualityAnalysis/qualityquery/qualityqueryhigh',component: qualityQueryHigh,meta:{keepAlive: true}},			//分析查询高中
		    {name:"examInfoHigh",path: '/qualityAnalysis/qualityquery/qualityqueryhigh/examinfohigh',component: examInfoHigh},			//分析查询高中点查看详情页面
		    {name:"queryDetailedHigh",path: '/qualityAnalysis/qualityquery/qualityqueryhigh/examinfohigh/querydetailedhigh',component: queryDetailedHigh},			//分析查询高中点查看学生成绩页面
		    {name:"qualityQueryMiddle",path: '/qualityAnalysis/qualityquery/qualityquerymiddle',component: qualityQueryMiddle,meta:{keepAlive: true}},
		    {name:"examInfoMiddle",path: '/qualityAnalysis/qualityquery/qualityquerymiddle/examinfomiddle',component: examInfoMiddle},	//分析查询初中
		    {name:"queryDetailedMiddle",path: '/qualityAnalysis/qualityquery/qualityquerymiddle/examinfomiddle/querydetailedmiddle',component: queryDetailedMiddle},			//分析查询高中点查看学生成绩页面
	    {name:"学生查询",path: '/qualityAnalysis/studentinquiry'},
		    {name:"scoreReport",path: '/qualityAnalysis/studentinquiry/scorereport',component: scoreReport},		//分析查询初中
		    {name:"studentQueryDetailed",path: '/qualityAnalysis/studentinquiry/scorereport/studentquerydetailed',component: studentQueryDetailed},
	    //新高考
	    {name:"选科数据分析",path: '/newhightest/choosedataanalysis'},
	    	{name:"combinationScore",path: '/newhightest/choosedataanalysis/combinationscore',component: combinationScore},
	    {name:"新高考选科",path: '/newhightest/choosesubject'},
		    {name:"studentChooseSubject",path: '/newhightest/choosesubject/studentchoosesubject',component: studentChooseSubject},
		    {name:"subjectStatistics",path: '/newhightest/choosesubject/subjectstatistics',component: subjectStatistics},
		
		
		
		//选课排课
		{name:"选科系统",path: '/selectcourses/selectivesection'},
			{name:"selectionManagement",path: '/selectcourses/selectivesection/selectionmanagement',component:selectionManagement },
			{name:"selectionManageDetail",path: '/selectcourses/selectivesection/selectionmanagedetail',component:selectionManageDetail },
			{name:"studentSelection",path: '/selectcourses/selectivesection/studentselection',component:studentSelection },
		{name:"分层排班",path: '/selectcourses/hierarchicalscheduling'},
			{name:"hierarchicalNameManagement",path: '/selectcourses/hierarchicalscheduling/hierarchicalnamemanagement',component:hierarchicalNameManagement },
			{name:"achievementintroduction",path: '/selectcourses/hierarchicalscheduling/achievementintroduction',component:achievementIntroduction },
			{name:"laminationManagementdetail",path: '/selectcourses/hierarchicalscheduling/laminationmanagementdetail',component:laminationManagementdetail },
			{name:"laminationManagement",path: '/selectcourses/hierarchicalscheduling/laminationmanagement',component:laminationManagement },
			{name:"divisionresult",path: '/selectcourses/hierarchicalscheduling/divisionresult',component:divisionResult },	
		{name:"排课系统",path: '/selectcourses/coursesystem'},
			{name:"curriculumRules",path: '/selectcourses/coursesystem/curriculumrules',component:curriculumRules },
			{name:"scheduleRules",path: '/selectcourses/coursesystem/schedulerules',component:scheduleRules },
			{name:"teacherRules",path: '/selectcourses/coursesystem/teacherrules',component:teacherRules },
		{name:"基础设置",path: '/selectcourses/basicsetting'},
			{name:"classesGroup",path: '/selectcourses/basicsetting/classesgroup',component:classesGroup },	
			{name:"classHours",path: '/selectcourses/basicsetting/classhours',component:classHours },
			{name:"courseSetting",path: '/selectcourses/basicsetting/coursesetting',component:courseSetting },
			{name:"curriculumArrangement",path: '/selectcourses/basicsetting/curriculumarrangement',component:curriculumArrangement },
			{name:"teachGroup",path: '/selectcourses/basicsetting/teachgroup',component:teachGroup },
			{name:"teachRoomSetting",path: '/selectcourses/basicsetting/teachroomsetting',component:teachRoomSetting },
		
		
		
    ]},
    { path: '*', redirect: '/404',}
]
